package MethodAnnotations;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author quan
 * @Description TODO
 * @Date 2023/7/12 22:27
 */
public class Main {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
        User user1 = (User) context.getBean("User1");
        System.out.println(user1.getName());

        User user2 = (User) context.getBean("user2");
        System.out.println(user2.getName());
    }
}
